package thread;

import java.util.concurrent.ForkJoinPool;
import java.util.stream.LongStream;

public class ThreadTest {

    public static void main(String[] args) {

        long[] numbers = LongStream.rangeClosed(1, 10).toArray();

        ForkJoinSumCalculator task = new ForkJoinSumCalculator(numbers);

        Long invoke = new ForkJoinPool().invoke(task);
        System.out.println(invoke);

    }




}
